<script>
import { layout, header } from '@/mixins/layout'
export default {
  name: 'DefaultTabsColumnHeader',
  mixins: [layout, header]
}
</script>

<template>
  <div class="custom-header">
    <div class="header-body">
      <div v-if="temp.sfxs === true" class="header-title-icon">
        <i :class="temp.lmtb" />
      </div>
      <div class="header-title">
        <div
          v-for="(item, index) in tabsColumn"
          :key="'item-' + index"
          class="custom-header-li"
          :class="index === active ? 'active': ''"
          @click="headerClick(item, index)"
        >
          <span>{{ item.label }}</span>
        </div>
      </div>
      <div
        v-if="isMore === true"
        class="header-icon"
        @click="openMore"
      >
        <span class="more-span">MORE<i class="el-icon-d-arrow-right" /></span>
      </div>
    </div>
  </div>
</template>
<style lang="scss" scoped>
.custom-header {
  width: 100%;
  height: 60px;
  padding: 0 10px;
  box-sizing: border-box;
  line-height: 60px;
  cursor: pointer;
  background-color: var(--edu-bk-200);
  display: flex;
  align-items: center;
}
.header-body {
  width: 100%;
  height: 100%;
  display: flex;
  flex-flow: row nowrap;
  color: var(--edu-text-200);
  border-bottom: 1px solid var(--edu-border-100);
}
.header-title-icon {
  width: 36px;
  height: 60px;
  text-align: center;
  color: var(--edu-hover-text-100);
  i {
    font-size: 1.4rem;
  }
}
.header-icon {
  width: 60px;
  height: 60px;
  flex: 0 1 auto;
  line-height: 60px;
  text-align: center;
}
.more-span {
  display: block;
  height: 60px;
  width: 60px;
  line-height: 60px;
  text-align: center;
  cursor: pointer;
  font-size: 0.9rem;
}
.header-title {
  height: 60px;
  flex: 1 1 auto;
  display: flex;
  flex-flow: row nowrap;
}
.header-title ::v-deep .el-image {
  width: 25px;
  height: 25px;
  margin-top: 8px;
}

.custom-header-li {
  padding: 0 10px;
  box-sizing: border-box;
  flex: 0 1 auto;
  height: 60px;
  position: relative;
  font-weight: 600;
}
.custom-header-li.active,
.custom-header-li:hover {
  color: var(--edu-hover-text-100);
  font-size: 1.1rem;
}
.custom-header-li.active:after{
  content: "";
  position: absolute;
  height: 3px;
  left: 2px;
  bottom: 0;
  right: 2px;
  background-color: var(--edu-hover-bg-100);
}
.custom-header-li .more-span {
  display: block;
  height: 20px;
  width: 60px;
  margin-top: 22px;
  line-height: 15px;
  text-align: center;
  cursor: pointer;
  font-size: 0.9rem;
}
.more-span:hover {
  color: var(--edu-hover-bg-100);
}
</style>
